<template>
  <div id="app">
    <router-view />
    <!-- <div class="onlineChat" v-if="userInfo.userId">
      <img src="@/assets/img/serve.png" @click="getdata" style="width: 60px; height: 60px;" />
    </div> -->
  </div>
</template>

<script>
import {
  baseURL,
  req,
  reqJson,
  encrypt,
  decrypt,
  reqtoken,
  service,
  format,
  getUrl,
} from "@/api/axiosFun";
import {
  setStore,
  getStore,
  removeStore,
  setStoreS,
  insertCharacter,
  phoneReg,
} from "@/utils/util";
import { mapState, mapGetters } from "vuex";
import FingerprintJS from "@fingerprintjs/fingerprintjs";
export default {
  name: "App",
  data() {
    return { 
      hostname:"https://dev.novalinkpay.com/", 
      // hostname: 'https://vip.novalinkpay.com/',
      hostname: 'https://www.gwhalepay.com/',  
      userInfo:{}

    };
  },
  // 注册组件
  components: { 
  },
  computed: {
    ...mapGetters(["getUser"]), 
  },
  watch: {
    getUser(newVal) { 
      if(newVal){
        this.userInfo = JSON.parse(newVal); 
        // this.getdata();  
      }
    },
  },  

  created() { 
    let  FingerprintId = ''; 
    FingerprintJS.load().then((fp) => {
      fp.get().then((result) => {
        FingerprintId = result.visitorId; 
        // console.log(result.visitorId,'result.visitorId')
        setStore('ssttkktt',result.visitorId) 
        // console.log(getStore('ssttkktt'),"getStore('ssttkktt')")

      });
    }); 

    document.addEventListener('contextmenu', function (e) {
      e.preventDefault();
    });


    document.addEventListener('keydown', function (e) {
      if (e.key === 'F12') {
        e.preventDefault();
      }
    }); 

    setInterval(this.checkDevTools, 1000); 
  },
  methods: { 
    checkDevTools() {
      const startTime = performance.now();
      debugger; // eslint-disable-next-line no-debugger
      const endTime = performance.now();
      // 设置一个阈值，例如100毫秒
      if (endTime - startTime > 100) {
        // 执行一些操作，如重定向到空白页等 
      }
    },
    getdata(parameter) { 
      service
        .get("/api/photon/getChatUrl", {})
        .then((res) => { 
          if (res.code == 0) { 
            window.open(res.data, '_blank'); 
          } else {
            this.$message({
              type: "info",
              message: res.msg,
            });
          }
        })
        .catch((err) => { 
          this.$message.error(spStr(err, "PhotonPay", ""));
        });
    },
  }
};
 
</script>

<style>
html,
body {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0px;
  margin: 0px;
  font-size: 16px;
}
.onlineChat{
  position: fixed;
  bottom: 80px;
  right: 50px;
  z-index: 99999;
  background: #e3b85a;
  border-radius: 100%;
  cursor: pointer;
  
}
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  width: 100%;
  height: 100%;
}
.el-dialog {
  border-radius: 15px;
}
 

.el-card.is-always-shadow, .el-card.is-hover-shadow:focus, .el-card.is-hover-shadow:hover{
  box-shadow: 0px 2px 4px 0px  rgba(189, 205, 221, 0.58)!important;
  border-radius: 8px!important;
}
.el-table th.el-table__cell{
  background: #F5F8FB!important;
}
.el-button--primary{
  /* background-color: #e3b85a!important;
  border-color: #e3b85a!important; */


  background-color: rgba(227, 184, 90) !important;
  border-color: rgba(227, 184, 90) !important;

  /* background-color: rgb(179,106,245)!important;
  border-color: rgb(179,106,245)!important; */

  
}
.el-pagination.is-background .el-pager li:not(.disabled).active{
  background-color: #e3b85a!important;
  /* background-color: rgb(179,106,245)!important; */ 
}


.boxBlock{ 
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 2px 4px 0px rgba(189, 205, 221, 0.58);
  padding: 16px 20px; 
  margin:20px 0;
}
.serachTop{
  display: flex;
  /* justify-content: space-between; */
  justify-content: flex-start;
  align-items: center;
}
.el-dialog__title{
  font-weight: bold;
}
.el-dialog__header{
  padding: 20px 0;
  margin: 0 20px;
  border-bottom: 1px solid #eee;
}
.el-form-item{
  margin-bottom: 20px;
}

.dialogItem{
  padding: 10px 10px;
  background: #f9faff;
  /* border-bottom:1px solid #eee;  */
}
.dialogItem span{
  position: relative;
  font-size: 20px; 
  color: #000;
  padding: 10px 10px;
}
.dialogItem span::after{
  position: absolute;
  content: '';
  left: 0;
  top:10px;
  width: 4px;
  height: 20px;
  background: rgb(227, 184, 90);
}
.el-form-item__label{
  font-weight: bold;
}
.el-button--text{
  color: #e3b85a;
}
.el-checkbox.is-bordered.is-checked{
  border-color:#e3b85a;
}
.el-checkbox__input.is-checked+.el-checkbox__label{
  color: #e3b85a;
}
.el-tag{
  background-color:#fff7ed;
  border-color:#e3b85a;
  color: #e6a23c;
} 
/* 在全局样式文件中或者组件内 */
:root {
  --main-color: rgb(227, 184, 90); /* 新的主色 */
  --main-text-color: #fff; /* 主文本颜色 */
}

.el-button--default:hover{
  color: rgb(227, 184, 90);
  border:1px solid rgb(227, 184, 90);
  background: #EBEEF5;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
  background-color:#e3b85a;
  border-color: #e3b85a;
}

.el-radio-button__orig-radio:checked+.el-radio-button__inner{ 
  box-shadow: 0 0 0 0 rgb(227, 184, 90);
  background-color:#e3b85a;
}
.el-radio__input.is-checked+.el-radio__label{
  color: rgb(227, 184, 90);
}
.el-radio__input.is-checked .el-radio__inner{
  border-color: #e3b85a;
  background-color:#e3b85a;
}
.el-button--default:active{
  color: rgb(227, 184, 90);
  border-color: #e3b85a;
}
.bg-gray{
  background: #f9faff;
}
.el-select-dropdown__item.selected{
  color: rgb(227, 184, 90);
}
.el-dialog__body{
  max-height: 500px;
  overflow-y: scroll;
}
.el-dialog__footer{
  border-top:1px solid #eee;
}
.el-pagination{
  text-align: right;
}
.el-button--primary:hover{
  color: #fff;
}
.el-date-table td.end-date span, .el-date-table td.start-date span{
  background-color:#e3b85a;
}
.el-date-table td.today span{
  color: rgb(227, 184, 90);
}
.el-time-panel__btn.confirm{
  color: rgb(227, 184, 90);
}
 
.el-time-spinner__item {
  height: 35px !important;
  line-height: 35px !important;
}
/* .el-input--small .el-input__inner{
  font-size: 14px;
}
.el-range-editor--small .el-range-input{
  font-size: 14px;
}
.el-table th.el-table__cell>.cell,.el-table td.el-table__cell div{
  font-size: 14px;
} */
/* 这将覆盖默认的主色和文本颜色 */
/* .el-button {
  background-color: var(--main-color) !important;
  color: var(--main-text-color) !important;
} */

 
/* .el-button--primary,
.el-button--warning,
.el-button--danger,
.el-pager li.active,
.el-radio-button.is-active .el-radio-button__inner,
.el-radio__input.is-checked .el-radio__inner,
.el-date-table td.current:not(.disabled) span {
  background-color: #8686ee !important;
  border-color: #8686ee !important;
}
.el-radio__inner:hover {
  border-color: #8686ee !important;
}
.el-radio-button.is-active .el-radio-button__inner:hover {
  color: #fff !important;
}
.el-pager li:hover,
.el-radio-button .el-radio-button__inner:hover,
.el-radio.is-checked .el-radio__label,
.el-select-dropdown__item.selected,
.el-date-table td.today span,
.el-date-table td:hover {
  color: #8686ee !important;
}

.el-button--primary.is-disabled,
.el-button--warning.is-disabled,
.el-button--danger.is-disabled {
  background-color: #b8c0cc !important;
  border-color: #b8c0cc !important;
} */

:deep(.el-tabs__item.is-active){
  color: #e3b85a!important;
} 
.common_title{ 
  padding:20px  0 20px 20px;  
}
.common_title span{
  font-size: 20px; 
  font-weight:bold;
  position: relative;
  padding-left: 20px;
}
.common_title span::after{
  left: 0;
  top:0px;
  position: absolute;
  content:'';
  width: 4px;
  height: 24px;
  background: #e3b85a;
  border-radius: 10px; 

}
</style>
